#include <tut.h>
#include <iostream>

namespace tut
{
   test_runner_singleton runner;
}

class callback : public tut::callback
{
public:
  void run_started(){ std::cout << "begin\n"; }

  void test_completed(const tut::test_result& tr)
  {
    std::cout << tr.test << "=" << tr.result << std::endl;
  }

  void run_completed(){ std::cout << "end\n"; }
};

extern "C" int tut_main();

int tut_main()
{
   callback clbk;
   tut::runner.get().set_callback(&clbk);
   // run all tests in all groups
   tut::runner.get().run_tests();

   // run all tests in group "shared_ptr"
   tut::runner.get().run_tests("shared_ptr");

   // run test number 5 in group "shared_ptr"
   tut::runner.get().run_test("shared_ptr",3);
   return 0;
}
